package com.cy.jxc.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Data
@Accessors
@AllArgsConstructor
@NoArgsConstructor
//@PropertySource("ValidationMessages.properties")
public class User {
    private Integer userid;
    @Size(min=1,max=10,message ="{user.name.size}")
    @NotBlank(message = "{user.name.notnull}")
    @NotNull(message = "{user.name.notnull}")
    private String username;
    @NotBlank(message = "{password.name.notnull}")
    @NotNull(message = "{password.name.notnull}")
    private String password;
    private  String email;
}
